#ifndef SIGNUPWIDGET_H
#define SIGNUPWIDGET_H

#include <QWidget>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkAccessManager>

#include "server.h"

namespace Ui {
class SignUpWidget;
}

class SignUpWidget : public QWidget
{
    Q_OBJECT

public:
    explicit SignUpWidget(QWidget *parent = nullptr);
    ~SignUpWidget();

private slots:
    void slot_finishRequest(QNetworkReply *);

    void on_pushButton_signUp_clicked();

private:
    Ui::SignUpWidget *ui;

    const QString m_signUpUrl = "http://" + Server::serverAddr() + ":" + Server::port() + "/users";
    QNetworkRequest m_request;
    QNetworkAccessManager m_manager;
};

#endif // SIGNUPWIDGET_H
